Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Subdivision Styles

QuickDraw 3D provides routines that you can use to manage subdivision styles.

Q3SubdivisionStyle_New

You can use the Q3SubdivisionStyle_New function to create a new subdivision style object.

TQ3StyleObject Q3SubdivisionStyle_New (
                     const TQ3SubdivisionStyleData *data);
data
A pointer to a subdivision style data structure.

DESCRIPTION

The Q3SubdivisionStyle_New function returns, as its function result, a new style object having the subdivision style specified by the data parameter. The method field of the subdivision style data structure pointed to by the data parameter should be one of these values:

kQ3SubdivisionMethodConstant
kQ3SubdivisionMethodWorldSpace
kQ3SubdivisionMethodScreenSpace

The meaning of the c1 and c2 fields depends on the value of the method field. See "Subdivision Style Data Structure" for details.

If a new style object could not be created, Q3SubdivisionStyle_New returns the value NULL .

To change the current subdivision style, you must actually draw the style object. You can call Q3Style_Submit to draw the style in retained mode or Q3SubdivisionStyle_Submit to draw the style in immediate mode.

SEE ALSO

See "Subdivision Styles" for a description of subdivision styles.

Q3SubdivisionStyle_Submit

You can use the Q3SubdivisionStyle_Submit function to submit a subdivision style in immediate mode.

TQ3Status Q3SubdivisionStyle_Submit (
                     const TQ3SubdivisionStyleData *data,
                     TQ3ViewObject view);
data
A pointer to a subdivision style data structure.
view
A view.

DESCRIPTION

The Q3SubdivisionStyle_Submit function sets the subdivision style of the view specified by the view parameter to the style specified by the data parameter.

SPECIAL CONSIDERATIONS

You should call Q3SubdivisionStyle_Submit only in a submitting loop.

Q3SubdivisionStyle_GetData

You can use the Q3SubdivisionStyle_GetData function to get the subdivision style method and specifiers of a subdivision style.

TQ3Status Q3SubdivisionStyle_GetData (
                     TQ3StyleObject subdiv,
                     TQ3SubdivisionStyleData *data);
subdiv
A subdivision style object.
data
On exit, a pointer to a subdivision style data structure.

DESCRIPTION

The Q3SubdivisionStyle_GetData function returns, in the data parameter, a pointer to a subdivision style data structure for the style object specified by the subdiv parameter.

Q3SubdivisionStyle_SetData

You can use the Q3SubdivisionStyle_SetData function to set the subdivision style method and specifiers of a subdivision style.

TQ3Status Q3SubdivisionStyle_SetData (
                     TQ3StyleObject subdiv,
                     const TQ3SubdivisionStyleData *data);
subdiv
A subdivision style object.
data
A pointer to a subdivision style data structure.

DESCRIPTION

The Q3SubdivisionStyle_SetData function sets the subdivision style values of the style object specified by the subdiv parameter to the values specified in the data parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |